<template>
  <div class="main-2">
    <!-- 购物车定位按钮 -->
    <div class="cart" @click="cart">
      <van-icon name="shopping-cart" color="#ffffff" size="25px" />
    </div>
    <!-- 搜索框  它在components文件夹下的search里面 -->
    <SearchStore></SearchStore>
    <div>
      <!-- 轮播图 它在本文件夹的sildeView里-->
      <sildeView></sildeView>
      <!-- 狗狗主粮  它在本文件夹下的classifyIco里-->
      <classifyIco></classifyIco>
      <!-- 限时购 它在本文件夹的limitBuy里-->
      <limitBuy></limitBuy>
      <!-- samllbanner 它在本文件夹的samllpic里-->
      <samllpic></samllpic>
      <!-- 宠名优选 它在本文件夹的goodsList里-->
      <goodsList></goodsList>
    </div>
  </div>
</template>
<script>
import SearchStore from "./SearchStore.vue";
import sildeView from "./sildeView.vue";
import classifyIco from "./classifyIco.vue";
import limitBuy from "./limitBuy.vue";
import samllpic from "./samllpic.vue";
import goodsList from "./goodsList.vue";
export default {
  data() {
    return {};
  },
  components: {
    SearchStore,
    sildeView,
    classifyIco,
    limitBuy,
    samllpic,
    goodsList,
  },
  activated() {
    location.reload();
  },
  methods: {
    cart() {
      this.$router.push("/cart");
    },
  },
};
</script>
<style lang="less" scoped>
// 顶部搜索框和底部预留空间
.main-2 {
  // padding-top: 70px;
  padding-bottom: 80px;
}
.cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(116, 119, 126, 0.5);
  position: fixed;
  bottom: 10%;
  right: 10%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.van-cell {
  background-color: #ffffff;
}
</style>
